#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char const *argv[])
{
        if(argc != 2){
                printf("./a.out file name \n");
                return -1;
        }

        int fd = open(argv[1], O_RDWR);
        int ret = lseek(fd, 0, SEEK_END);
        printf("file size is:%d\n", ret);
        close(fd);

        return 0;
}